<!DOCTYPE html>
<html lang=en>
<head>
    <!-- so meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="HandheldFriendly" content="True">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta name="description" content="SpringBoot war包部署到Tomcat服务器　　（1）pom.xml文件修改war，默认是jar包，节点中增加springboot，即生成war包的名字，完整pom.xml文件内容如下：    &lt;project xmlns&#x3D;”http:&#x2F;&#x2F;maven.apache.org&#x2F;POM&#x2F;4.0.0“ xmlns:xsi&#x3D;”http:&#x2F;&#x2F;www.w3.org&#x2F;2001&#x2F;XMLSchema-">
<meta property="og:type" content="article">
<meta property="og:title" content="SpringBootwar包部署到Tomcat服务器">
<meta property="og:url" content="http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/index.html">
<meta property="og:site_name" content="TmoonSite">
<meta property="og:description" content="SpringBoot war包部署到Tomcat服务器　　（1）pom.xml文件修改war，默认是jar包，节点中增加springboot，即生成war包的名字，完整pom.xml文件内容如下：    &lt;project xmlns&#x3D;”http:&#x2F;&#x2F;maven.apache.org&#x2F;POM&#x2F;4.0.0“ xmlns:xsi&#x3D;”http:&#x2F;&#x2F;www.w3.org&#x2F;2001&#x2F;XMLSchema-">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://common.cnblogs.com/images/copycode.gif">
<meta property="og:image" content="https://common.cnblogs.com/images/copycode.gif">
<meta property="og:image" content="https://common.cnblogs.com/images/copycode.gif">
<meta property="og:image" content="https://common.cnblogs.com/images/copycode.gif">
<meta property="og:image" content="https://images2015.cnblogs.com/blog/961610/201707/961610-20170723161450440-236713010.png">
<meta property="article:published_time" content="2019-02-11T19:11:12.000Z">
<meta property="article:modified_time" content="2020-01-07T10:48:14.742Z">
<meta property="article:author" content="Tmoonlight">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://common.cnblogs.com/images/copycode.gif">
    
    
        
          
              <link rel="shortcut icon" href="/images/favicon.ico">
          
        
        
          
            <link rel="icon" type="image/png" href="/images/logo2.gif" sizes="192x192">
          
        
        
          
            <link rel="apple-touch-icon" sizes="180x180" href="/images/logo2.gif">
          
        
    
    <!-- title -->
    <title>SpringBootwar包部署到Tomcat服务器</title>
    <!-- styles -->
    
<link rel="stylesheet" href="/css/style.css">

    <!-- persian styles -->
    
      
<link rel="stylesheet" href="/css/rtl.css">

    
    <!-- rss -->
    
    
<meta name="generator" content="Hexo 4.2.0"></head>

<body class="max-width mx-auto px3 ltr">
    
      <div id="header-post">
  <a id="menu-icon" href="#"><i class="fas fa-bars fa-lg"></i></a>
  <a id="menu-icon-tablet" href="#"><i class="fas fa-bars fa-lg"></i></a>
  <a id="top-icon-tablet" href="#" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');" style="display:none;"><i class="fas fa-chevron-up fa-lg"></i></a>
  <span id="menu">
    <span id="nav">
      <ul>
         
          <li><a href="/">Home</a></li>
         
          <li><a href="/about/">About</a></li>
         
          <li><a href="/archives/">Writing</a></li>
         
          <li><a href="/projects_url">Projects</a></li>
        
      </ul>
    </span>
    <br/>
    <span id="actions">
      <ul>
        
        <li><a class="icon" href="/2019/02/23/Nginx%E5%AD%90%E8%B7%AF%E5%BE%84%E5%88%B0%E7%AB%AF%E5%8F%A3%E6%98%A0%E5%B0%84/"><i class="fas fa-chevron-left" aria-hidden="true" onmouseover="$('#i-prev').toggle();" onmouseout="$('#i-prev').toggle();"></i></a></li>
        
        
        <li><a class="icon" href="/2019/02/02/SQL%E4%B8%AD%E5%85%B3%E4%BA%8EEXISTS%E8%B0%93%E8%AF%8D%E7%9A%84%E7%90%86%E8%A7%A3/"><i class="fas fa-chevron-right" aria-hidden="true" onmouseover="$('#i-next').toggle();" onmouseout="$('#i-next').toggle();"></i></a></li>
        
        <li><a class="icon" href="#" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');"><i class="fas fa-chevron-up" aria-hidden="true" onmouseover="$('#i-top').toggle();" onmouseout="$('#i-top').toggle();"></i></a></li>
        <li><a class="icon" href="#"><i class="fas fa-share-alt" aria-hidden="true" onmouseover="$('#i-share').toggle();" onmouseout="$('#i-share').toggle();" onclick="$('#share').toggle();return false;"></i></a></li>
      </ul>
      <span id="i-prev" class="info" style="display:none;">Previous post</span>
      <span id="i-next" class="info" style="display:none;">Next post</span>
      <span id="i-top" class="info" style="display:none;">Back to top</span>
      <span id="i-share" class="info" style="display:none;">Share post</span>
    </span>
    <br/>
    <div id="share" style="display: none">
      <ul>
  <li><a class="icon" href="http://www.facebook.com/sharer.php?u=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/" target="_blank" rel="noopener"><i class="fab fa-facebook " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://twitter.com/share?url=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&text=SpringBootwar包部署到Tomcat服务器" target="_blank" rel="noopener"><i class="fab fa-twitter " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.linkedin.com/shareArticle?url=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&title=SpringBootwar包部署到Tomcat服务器" target="_blank" rel="noopener"><i class="fab fa-linkedin " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://pinterest.com/pin/create/bookmarklet/?url=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&is_video=false&description=SpringBootwar包部署到Tomcat服务器" target="_blank" rel="noopener"><i class="fab fa-pinterest " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="mailto:?subject=SpringBootwar包部署到Tomcat服务器&body=Check out this article: http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/"><i class="fas fa-envelope " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://getpocket.com/save?url=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&title=SpringBootwar包部署到Tomcat服务器" target="_blank" rel="noopener"><i class="fab fa-get-pocket " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://reddit.com/submit?url=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&title=SpringBootwar包部署到Tomcat服务器" target="_blank" rel="noopener"><i class="fab fa-reddit " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.stumbleupon.com/submit?url=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&title=SpringBootwar包部署到Tomcat服务器" target="_blank" rel="noopener"><i class="fab fa-stumbleupon " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://digg.com/submit?url=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&title=SpringBootwar包部署到Tomcat服务器" target="_blank" rel="noopener"><i class="fab fa-digg " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.tumblr.com/share/link?url=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&name=SpringBootwar包部署到Tomcat服务器&description=" target="_blank" rel="noopener"><i class="fab fa-tumblr " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://news.ycombinator.com/submitlink?u=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&t=SpringBootwar包部署到Tomcat服务器" target="_blank" rel="noopener"><i class="fab fa-hacker-news " aria-hidden="true"></i></a></li>
</ul>

    </div>
    <div id="toc">
      <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#SpringBoot-war包部署到Tomcat服务器"><span class="toc-number">1.</span> <span class="toc-text">SpringBoot war包部署到Tomcat服务器</span></a></li></ol>
    </div>
  </span>
</div>

    
    <div class="content index py4">
        
        <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
  <header>
    
    <h1 class="posttitle" itemprop="name headline">
        SpringBootwar包部署到Tomcat服务器
    </h1>



    <div class="meta">
      <span class="author" itemprop="author" itemscope itemtype="http://schema.org/Person">
        <span itemprop="name">TmoonSite</span>
      </span>
      
    <div class="postdate">
      
        <time datetime="2019-02-11T19:11:12.000Z" itemprop="datePublished">2019-02-12</time>
        
      
    </div>


      

      

    </div>
  </header>
  

  <div class="content" itemprop="articleBody">
    <h1 id="SpringBoot-war包部署到Tomcat服务器"><a href="#SpringBoot-war包部署到Tomcat服务器" class="headerlink" title="SpringBoot war包部署到Tomcat服务器"></a><a href="https://www.cnblogs.com/gdpuzxs/p/7224959.html" target="_blank" rel="noopener">SpringBoot war包部署到Tomcat服务器</a></h1><p>　　（1）pom.xml文件修改<packaging>war</packaging>，默认是jar包，<build>节点中增加<finalName>springboot</finalName>，即生成war包的名字，完整pom.xml文件内容如下：</p>
<p><img src="https://common.cnblogs.com/images/copycode.gif" alt=""></p>
<?xml version="1.0" encoding="UTF-8"?>

<p>&lt;project xmlns=”<a href="http://maven.apache.org/POM/4.0.0" target="_blank" rel="noopener">http://maven.apache.org/POM/4.0.0</a>“ xmlns:xsi=”<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank" rel="noopener">http://www.w3.org/2001/XMLSchema-instance</a>“</p>
<p>xsi:schemaLocation=”<a href="http://maven.apache.org/POM/4.0.0" target="_blank" rel="noopener">http://maven.apache.org/POM/4.0.0</a><a href="http://maven.apache.org/xsd/maven-4.0.0.xsd" target="_blank" rel="noopener">http://maven.apache.org/xsd/maven-4.0.0.xsd</a>“&gt;</p>
<p><modelVersion>4.0.0</modelVersion></p>
<p><groupId>springboot</groupId></p>
<p><artifactId>springboot</artifactId></p>
<p><version>0.0.1-SNAPSHOT</version></p>
<p><packaging>war</packaging></p>
<p><name>springboot</name></p>
<p><description>Demo project for Spring Boot</description></p>
<parent>

<p><groupId>org.springframework.boot</groupId></p>
<p><artifactId>spring-boot-starter-parent</artifactId></p>
<p><version>1.5.4.RELEASE</version></p>
<p><relativePath/> <!-- lookup parent from repository --></p>
</parent>




<properties>

<p>&lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;</p>
<p>&lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;</p>
<p>&lt;java.version&gt;1.7&lt;/java.version&gt;</p>
</properties>




<dependencies>

<dependency>

<p><groupId>org.springframework.boot</groupId></p>
<p><artifactId>spring-boot-starter</artifactId></p>
<exclusions>

<exclusion>

<p><groupId>org.springframework.boot</groupId></p>
<p><artifactId>spring-boot-starter-logging</artifactId></p>
</exclusion>

</exclusions>

</dependency>

<dependency>

<p><groupId>org.springframework.boot</groupId></p>
<p><artifactId>spring-boot-starter-web</artifactId></p>
</dependency>

<dependency>

<p><groupId>org.springframework.boot</groupId></p>
<p><artifactId>spring-boot-starter-test</artifactId></p>
<p><scope>test</scope></p>
</dependency>

<dependency>

<p><groupId>org.springframework.boot</groupId></p>
<p><artifactId>spring-boot-starter-thymeleaf</artifactId></p>
</dependency>

<dependency>

<p><groupId>org.springframework.boot</groupId></p>
<p><artifactId>spring-boot-starter-log4j</artifactId></p>
<p><version>1.3.8.RELEASE</version></p>
</dependency>

<dependency>

<p><groupId>org.springframework.boot</groupId></p>
<p><artifactId>spring-boot-starter-data-redis</artifactId></p>
</dependency>

<dependency>

<p><groupId>mysql</groupId></p>
<p><artifactId>mysql-connector-java</artifactId></p>
</dependency>

<dependency>

<p><groupId>org.mybatis.spring.boot</groupId></p>
<p><artifactId>mybatis-spring-boot-starter</artifactId></p>
<p><version>1.1.1</version></p>
</dependency>

</dependencies>




<build>

<p><finalName>springboot</finalName></p>
<plugins>

<plugin>

<p><groupId>org.springframework.boot</groupId></p>
<p><artifactId>spring-boot-maven-plugin</artifactId></p>
</plugin>

</plugins>

</build>

</project>

<p><img src="https://common.cnblogs.com/images/copycode.gif" alt=""></p>
<p>　　（2）修改项目启动类，继承SpringBootServletInitializer，如下：</p>
<p><img src="https://common.cnblogs.com/images/copycode.gif" alt=""></p>
<p>package springboot;</p>
<p>import org.springframework.boot.SpringApplication;</p>
<p>import org.springframework.boot.autoconfigure.SpringBootApplication;</p>
<p>import org.springframework.boot.builder.SpringApplicationBuilder;</p>
<p>import org.springframework.boot.web.support.SpringBootServletInitializer;</p>
<p>import org.springframework.cache.annotation.EnableCaching;</p>
<p>import org.springframework.scheduling.annotation.EnableScheduling;</p>
<p>@SpringBootApplication</p>
<p>@EnableScheduling</p>
<p>@EnableCaching</p>
<p>public class SpringbootApplication extends SpringBootServletInitializer{</p>
<p>public static void main(String[] args) {</p>
<p>SpringApplication.run(SpringbootApplication.class, args);</p>
<p>}</p>
<p>@Override</p>
<p>protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {</p>
<p>return application.sources(SpringbootApplication.class);</p>
<p>}</p>
<p>}</p>
<p><img src="https://common.cnblogs.com/images/copycode.gif" alt=""></p>
<p>　　（3）打包：可以通过eclipse run as -&gt;maven install，也可以进入项目的根目录，也就是pom.xml同一级目录，启动cmd控制台，执行mvn install package,如下：</p>
<p>　　<img src="https://images2015.cnblogs.com/blog/961610/201707/961610-20170723161450440-236713010.png" alt=""></p>
<p> 　　（4）环境搭建（linux环境JDK安装与Tomacat安装（springboot支持tomcat7以上））</p>
<p> 　　 JDK安装参考：<a href="https://jingyan.baidu.com/article/ab0b56308966acc15afa7d18.html" target="_blank" rel="noopener">https://jingyan.baidu.com/article/ab0b56308966acc15afa7d18.html</a></p>
<p>　　  Tomcat安装参考：<a href="https://jingyan.baidu.com/article/27fa73268002f246f9271f45.html" target="_blank" rel="noopener">https://jingyan.baidu.com/article/27fa73268002f246f9271f45.html</a></p>
<p>　　（5）将打包好的war包上传至tomcat目录下webapp目录下，启动tomcat服务器。</p>
<p>　　（6）访问项目路径：<a href="http://ip/" target="_blank" rel="noopener">http://ip</a>地址：端口号/项目打包名称/方法名（项目打包名称即pom.xml中的<finnalName>的值）</p>
<p>　　（7）设置tomcat开机自动启动</p>
<p>　　　　（1）修改脚本文件rc.local：vim /etc/rc.d/rc.local</p>
<p>　　　　（2）在rc.local中增加：export JAVA_HOME = jdk安装路径 ，tomcat安装路径/bin/startup.sh start</p>

  </div>
</article>



        
          <div id="footer-post-container">
  <div id="footer-post">

    <div id="nav-footer" style="display: none">
      <ul>
         
          <li><a href="/">Home</a></li>
         
          <li><a href="/about/">About</a></li>
         
          <li><a href="/archives/">Writing</a></li>
         
          <li><a href="/projects_url">Projects</a></li>
        
      </ul>
    </div>

    <div id="toc-footer" style="display: none">
      <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#SpringBoot-war包部署到Tomcat服务器"><span class="toc-number">1.</span> <span class="toc-text">SpringBoot war包部署到Tomcat服务器</span></a></li></ol>
    </div>

    <div id="share-footer" style="display: none">
      <ul>
  <li><a class="icon" href="http://www.facebook.com/sharer.php?u=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/" target="_blank" rel="noopener"><i class="fab fa-facebook fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://twitter.com/share?url=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&text=SpringBootwar包部署到Tomcat服务器" target="_blank" rel="noopener"><i class="fab fa-twitter fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.linkedin.com/shareArticle?url=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&title=SpringBootwar包部署到Tomcat服务器" target="_blank" rel="noopener"><i class="fab fa-linkedin fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://pinterest.com/pin/create/bookmarklet/?url=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&is_video=false&description=SpringBootwar包部署到Tomcat服务器" target="_blank" rel="noopener"><i class="fab fa-pinterest fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="mailto:?subject=SpringBootwar包部署到Tomcat服务器&body=Check out this article: http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/"><i class="fas fa-envelope fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://getpocket.com/save?url=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&title=SpringBootwar包部署到Tomcat服务器" target="_blank" rel="noopener"><i class="fab fa-get-pocket fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://reddit.com/submit?url=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&title=SpringBootwar包部署到Tomcat服务器" target="_blank" rel="noopener"><i class="fab fa-reddit fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.stumbleupon.com/submit?url=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&title=SpringBootwar包部署到Tomcat服务器" target="_blank" rel="noopener"><i class="fab fa-stumbleupon fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://digg.com/submit?url=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&title=SpringBootwar包部署到Tomcat服务器" target="_blank" rel="noopener"><i class="fab fa-digg fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="http://www.tumblr.com/share/link?url=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&name=SpringBootwar包部署到Tomcat服务器&description=" target="_blank" rel="noopener"><i class="fab fa-tumblr fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://news.ycombinator.com/submitlink?u=http://yoursite.com/2019/02/12/SpringBootwar%E5%8C%85%E9%83%A8%E7%BD%B2%E5%88%B0Tomcat%E6%9C%8D%E5%8A%A1%E5%99%A8/&t=SpringBootwar包部署到Tomcat服务器" target="_blank" rel="noopener"><i class="fab fa-hacker-news fa-lg" aria-hidden="true"></i></a></li>
</ul>

    </div>

    <div id="actions-footer">
        <a id="menu" class="icon" href="#" onclick="$('#nav-footer').toggle();return false;"><i class="fas fa-bars fa-lg" aria-hidden="true"></i> Menu</a>
        <a id="toc" class="icon" href="#" onclick="$('#toc-footer').toggle();return false;"><i class="fas fa-list fa-lg" aria-hidden="true"></i> TOC</a>
        <a id="share" class="icon" href="#" onclick="$('#share-footer').toggle();return false;"><i class="fas fa-share-alt fa-lg" aria-hidden="true"></i> Share</a>
        <a id="top" style="display:none" class="icon" href="#" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');"><i class="fas fa-chevron-up fa-lg" aria-hidden="true"></i> Top</a>
    </div>

  </div>
</div>

        
        <footer id="footer">
  <div class="footer-left">
    Copyright &copy; 2020 Tmoonlight
  </div>
  <div class="footer-right">
    <nav>
      <ul>
         
          <li><a href="/">Home</a></li>
         
          <li><a href="/about/">About</a></li>
         
          <li><a href="/archives/">Writing</a></li>
         
          <li><a href="/projects_url">Projects</a></li>
        
      </ul>
    </nav>
  </div>
</footer>

    </div>
    <!-- styles -->

<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">


<link rel="stylesheet" href="/lib/justified-gallery/css/justifiedGallery.min.css">


    <!-- jquery -->

<script src="/lib/jquery/jquery.min.js"></script>


<script src="/lib/justified-gallery/js/jquery.justifiedGallery.min.js"></script>

<!-- clipboard -->

  
<script src="/lib/clipboard/clipboard.min.js"></script>

  <script type="text/javascript">
  $(function() {
    // copy-btn HTML
    var btn = "<span class=\"btn-copy tooltipped tooltipped-sw\" aria-label=\"Copy to clipboard!\">";
    btn += '<i class="far fa-clone"></i>';
    btn += '</span>'; 
    // mount it!
    $(".highlight table").before(btn);
    var clip = new ClipboardJS('.btn-copy', {
      text: function(trigger) {
        return Array.from(trigger.nextElementSibling.querySelectorAll('.code')).reduce((str,it)=>str+it.innerText+'\n','')
      }
    });
    clip.on('success', function(e) {
      e.trigger.setAttribute('aria-label', "Copied!");
      e.clearSelection();
    })
  })
  </script>


<script src="/js/main.js"></script>

<!-- search -->

<!-- Google Analytics -->

<!-- Baidu Analytics -->

<!-- Disqus Comments -->


</body>
</html>
